{template 'common/header'}
<ul class="nav nav-tabs">
        <li {if $op == 'list'}class="active" {/if}>
            <a href="{php echo $this->createWebUrl('region', array('op' => 'list'));}">小区管理</a>
        </li>
        <li>
            <a href="{php echo $this->createWebUrl('region', array('op' => 'add'));}">新增小区</a>
        </li>
        
    </ul>
    <div class="panel panel-info">
        <div class="panel-heading">筛选</div>
        <div class="panel-body">
            <form action="" method="post" class="form-horizontal" role="form">
                <div class="form-group">
                    <label class="col-xs-12 col-sm-3 col-md-2 control-label"><span class="text-danger">*</span> 地址</label>
                    <div class="col-sm-8 col-xs-12">
                        {php echo tpl_form_field_district('reside',array('province' => $item['province'],'city' => $item['city'],'district' => $item['dist']));}
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-xs-12 col-sm-2 col-md-2 control-label">小区名称</label>
                    <div class="col-sm-8 col-md-8 col-lg-8 col-xs-12">
                        <input class="form-control" name="keyword" id="" type="text" value="{$_GPC['keyword']}">
                    </div>
                </div>
                <div class="form-group">
                    <div class="pull-right col-xs-12 col-sm-2 col-md-2 col-lg-2">
                        <button class="btn btn-default"><i class="fa fa-search"></i> 搜索</button>
                    </div>
                </div>
            </form>
        </div>
    </div>
    <div style="padding:15px;">
        <table class="table table-hover table-condensed">
            <thead class="navbar-inner">
                <tr>
                    <th style="width:20%;">小区名称</th>
                    <th style="width:20%;">物业</th>
                    <th style="width:10%;">联系人</th>
                    <th style="width:15%;">联系电话</th>
                    <th style="width:20%;">地址</th>
                    <th style="width:30%;">操作</th>
                </tr>
            </thead>
            <tbody>
                {loop $list $item}
                <tr>
                    <td>{$item['city']}{$item['dist']}{$item['rtitle']}</td>
                    <td>{$item['ptitle']}</td>
                    <td>{$item['linkmen']}</td>
                    <td>{$item['linkway']}</td>
                    <td>{$item['address']}</td>
                    <td>
                        <a  href="{php echo $this->createWebUrl('region',array('op' => 'room','id' => $item['id']))}" title="" data-toggle="tooltip" data-placement="top" class="btn btn-default btn-sm" ><i class="glyphicon glyphicon-plus"></i>导入房号</a>
                        
                        <a href="{php echo $this->createWebUrl('region',array('op' => 'add','id' => $item['id']))}" title="编辑" class="btn btn-default btn-sm" ><i class="fa fa-edit" data-toggle="tooltip" data-placement="top"></i>编辑</a> 
                        
                        <a onclick="return confirm('删除小区，将要删除该小区下所有的小区用户，此操作不可恢复，确认吗？'); return false;" href="{php echo $this->createWebUrl('region',array('op' => 'delete','id' => $item['id']))}" title="删除" data-toggle="tooltip" data-placement="top" class="btn btn-default btn-sm" data-original-title="删除"><i class="fa fa-times"></i>删除</a>
                    </td>
                </tr>
                {/loop}
            </tbody>
        </table>
        {$pager}
    </div>
{template 'common/footer'}